package com.softoa.contorller;

import com.softoa.pojo.Inform;
import com.softoa.service.IInformService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/inform")
@CrossOrigin
public class InformController {

    @Autowired
    IInformService informService;

    @RequestMapping("list")
    public java.util.List<Inform> list(Inform inform){
        return informService.informList(inform);

    }
    @RequestMapping("perlist")
    public java.util.List<Inform> perlist(Inform inform){
        return informService.perlist(inform);
    }

    @RequestMapping("informpre")
    public boolean imformPre(Inform inform){
        return informService.informPre(inform);
    }

    @RequestMapping("insert")
    public boolean informInsert(Inform inform){

        return informService.informInsert(inform);
    }
    @RequestMapping("update")
    public int update(Inform inform){
       informService.update(inform);
       return 1;
    }
    @RequestMapping("upstate")
    public int upstate(Inform inform){
        informService.upstate(inform);
        return 1;
    }
    @RequestMapping("delete")
    public boolean informDelete(Inform informId){
        return informService.informDelete(informId);
    }
    @RequestMapping("test")
    public int usertest(Inform inform) {

        return informService.usertest(inform);
    }


}
